package pl.bizuteria.sklep.admin.client.activity.bracelet;

import pl.bizuteria.sklep.admin.client.activity.product.IRequestMixin;
import pl.bizuteria.sklep.api.shared.proxy.BraceletProxy;
import pl.bizuteria.sklep.api.shared.request.ApplicationRequestFactory;
import pl.bizuteria.sklep.api.shared.request.BraceletRequest;

import com.google.web.bindery.requestfactory.shared.RequestContext;

public class BraceletRequestMixin implements IRequestMixin<BraceletProxy> {

	ApplicationRequestFactory requestFactory;

	public BraceletRequestMixin(ApplicationRequestFactory requestFactory) {
		super();
		this.requestFactory = requestFactory;
	}

	public RequestContext createSaveRequest(BraceletProxy proxy) {
		BraceletRequest request = requestFactory.braceletRequest();
		request.persist(proxy);
		return request;
	}

}
